package nl.ejvos.bgpgames.cbbchess.server;

import nl.ejvos.bgpgames.cbbchess.shared.MoveMessage;
import nl.ejvos.bgpgames.cbbchess.shared.OpponentMovedMessage;

import com.hu.bgp.framework.Player;
import com.hu.bgp.framework.Server;
import com.hu.bgp.framework.clientapi.ClientToServerMessage;
import com.hu.bgp.server.GameContext;

public class ChessServer extends Server
{
	public ChessServer(GameContext gameContext)
	{
		super(gameContext);
	}

	public void handleMessage(ClientToServerMessage message)
	{
		if (message instanceof MoveMessage)
		{
			MoveMessage cm = (MoveMessage) message;
			broadcastMessage(new OpponentMovedMessage(cm.getX(), cm.getY(), cm.getToX(), cm.getToY()));
		}
	}

	public void addPlayer(Player player) {
		// TODO Auto-generated method stub
		
	}

	public void removePLayer(Player player) {
		// TODO Auto-generated method stub
		
	}


}
